<?php session_start();$_SESSION['page'] = 'client';?>
<?php
    $userID = $_GET['userID'];

    require('db_connection.php');
    $query = "SELECT * FROM tblclient WHERE userID='$userID'";
    $result = mysql_query($query);
    while ($row = mysql_fetch_array($result))
    {
        $libraryCardNo = $row['libraryCardNo'];
        $lastName = $row['lastName'];
        $firstName = $row['firstName'];
        $middleName = $row['middleName'];
        $address= $row['address'];
        $contactNo = $row['contactNo'];
        $email = $row['email'];
        $schoolorg = $row['schoolorg'];
        $guarantor= $row['guarantor'];
    }
?>

<!doctype html public "-//W3C//DTD HTML 4.01//EN">
<html>

   <head>
      <title>Client Edit</title>
      <meta http-equiv="generator" content="PHP Designer 2005" />
      <style type="text/css">
        @import url(style.css);
      </style>
   </head>

   <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000" class=''>

    <?php echo "<form method='post' action='update.php?page=client&userID=$userID'>"; ?>
    <table width='80%' align='center' class='content'>
        <tr><td colspan='2'><img src='images/banner.jpg'></td></tr>
        <tr><td align='right' colspan='2' class='logout'><?php require ('loginout.php');?></td></tr>
        <tr class='menuborder'><td width='90%'><img src='images/clientedit.png'></td><td><?php  require('buttons.php'); ?></td></tr>
        <tr><td colspan='2' class='bodyborder'>
            <table width='60%' align='center'>
                <tr><td height='30'></td></tr>
                <?php
                    echo "<tr><td>Library Card No.</td>";
                    echo "<td><input type='text' name='libraryCardNo' value='$libraryCardNo'size='45'/></td></tr>";
                    echo "<tr><td>Last Name</td>";
                    echo "<td><input type='text' name='lastName' value='$lastName' size='45'/></td></tr>";
                    echo "<tr><td>First Name</td>";
                    echo "<td><input type='text' name='firstName' value='$firstName'size='45'/></td></tr>";
                    echo "<tr><td>Middle Name</td>";
                    echo "<td><input type='text' name='middleName' value='$middleName'size='45'/></td></tr>";
                    echo "<tr><td>Address</td>";
                    echo "<td><input type='text' name='address' value='$address'size='45'/></td></tr>";
                    echo "<tr><td>Contact No</td>";
                    echo "<td><input type='text' name='contactNo' value='$contactNo'size='45'/></td></tr>";
                    echo "<tr><td>E-mail Address</td>";
                    echo "<td><input type='text' name='email' value='$email' size='45'/></td></tr>";
                    echo "<tr><td>School/Organization</td>";
                    echo "<td><input type='text' name='schoolorg' value='$schoolorg' size='45'/></td></tr>";
                    echo "<tr><td>Guarantor</td>";
                    echo "<td><input type='text' name='guarantor' value='$guarantor' size='45'/></td></tr>";
                    echo "<tr><td height='15'></td></tr>";
                    echo "<tr><td colspan='2' align='right'><input type='submit' value='Update' class='tool'></td></tr>";
                ?>
            </table>
            </td>
        </tr>
        <tr><td align='center' colspan='2'><?php require ('copyright.php')?></td></tr>
    </table>
    </form>

   </body>
</html>

